CREATE TABLE [dbo].[TDCOMP_COIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_COMP_PAGO] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_PAGO] [dbo].[TD_VC_008] NOT NULL,
[NU_CUOT_DETA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_CO__NU_CU__0D99FE17] DEFAULT ((0)),
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_CO__NU_PR__0E8E2250] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_CO__CO_US__0F824689] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_CO__FE_US__10766AC2] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_CO__CO_US__116A8EFB] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_CO__FE_US__125EB334] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_COIN] ADD CONSTRAINT [PK__TDCOMP_C__CD1489931E505424] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_COIN] ADD CONSTRAINT [FK__TDCOMP_COIN__38EF3BC7] FOREIGN KEY ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA]) REFERENCES [dbo].[TDCOMP_PAGO] ([CO_EMPR], [TI_COMP_PAGO], [NU_COMP_PAGO], [NU_CUOT_DETA])
GO
